package com.work.demo.service;
import com.work.demo.dao.impl.ProductDaoImpl;
import com.work.demo.entity.Product;
import com.work.demo.service.impl.ProductServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 产品服务层实现
 */
@Service("productService")
public class ProductService implements ProductServiceImpl {
    @Resource
    private ProductDaoImpl productDao;

    /**
     * 添加产品
     * @param product 实例对象
     * @return 对象
     */
    @Override
    public int insert(Product product) {
        return this.productDao.insert(product);
    }
  }
